package org.manon.json.io;

import org.manon.json.util.NumberUtil;

public interface Converter {

	Object convert(String convert);
	
	boolean isNumber();
	
	Converter STRING_CONVERTER = new Converter() {
		public Object convert(String convert) {
			return convert;
		}
		public boolean isNumber() {
			return false;
		}
	};
	
	Converter INTEGER_CONVERTER = new Converter() {
		public Object convert(String convert) {
			return NumberUtil.parseInteger(convert);
		}
		public boolean isNumber() {
			return true;
		}
	};
	
	
}